package com.yuyu.qingmangmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuyu.common.utils.PageUtils;
import com.yuyu.qingmangmall.product.entity.AttrEntity;
import com.yuyu.qingmangmall.product.vo.AttrRespVo;
import com.yuyu.qingmangmall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author yuwengsheng
 * @email 3337002363@qq.com
 * @date 2021-05-31 10:48:26
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBasePage(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    PageUtils getRelationNoAttr(Map<String, Object> params, Long attrgroupId);

    /**
     * 过滤出searchType为1的attrId
     * @param attrIds
     * @return
     */
    List<Long> getSearchAttrIds(List<Long> attrIds);
}

